package com.waghost.bridalgown.controller;

import com.waghost.bridalgown.dao.CommDao;
import com.waghost.bridalgown.dao.LogsDao;
import com.waghost.bridalgown.dao.ReserveDao;
import com.waghost.bridalgown.dao.UserBgLikeDao;
import com.waghost.bridalgown.entity.Result;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

// 数据可视化
@RestController
@CrossOrigin
@RequestMapping("dataparse")
@AllArgsConstructor
public class DataParseController {
    private LogsDao logsDao;
    private ReserveDao reserveDao;
    private CommDao commDao;
    private UserBgLikeDao userBgLikeDao;
    @GetMapping("/userLogin")
    public Result userLogin(){
        return Result.success(logsDao.selectLoginUser());
    }
    @GetMapping("/xl")
    public Result xl(){
        return Result.success(reserveDao.selectDataParse());
    }
    @GetMapping("/comm")
    public Result comm(){
        return Result.success(commDao.parseData());
    }
    @GetMapping("/bg")
    public Result bg(){
        return Result.success(userBgLikeDao.parseData());
    }

}
